import request from '@/utils/request'
/**
 * @param 获取中小客商机列表
 */
export function nicheList(query) {
  return request({
    url: '/ord/small/medium/list',
    method: 'GET',
    params: query
  })
}
/**
 * @param 获取中小客商机汇总列表
 */
export function nicheSummaryList(query) {
  return request({
    url: '/ord/small/medium/statistics',
    method: 'GET',
    params: query
  })
}
//新增中小客商机
export function saveNiche(data) {
  return request({
    url: 'ord/small/medium/save',
    method: 'POST',
    data
  })
}
//中小客商机详情
export function nicheDetail(id) {
  return request({
    url: `ord/small/medium/get/${id}`,
    method: 'GET'
  })
}
//删除中小客商机
export function delNiche(id) {
  return request({
    url: `ord/small/medium/delete/${id}`,
    method: 'POST'
  })
}

// 导出商机接口
export function exportNiche(data) {
  return request({
    url: '/ord/small/medium/export',
    method: 'post',
    data
  })
}
